// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.ResourceBundle;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

// Referenced classes of package com.unlimax.app.kerneos:
//            TMObject, SunSystemsService

public class MainApp {

	public MainApp() {
	}

	public static void main(String args[]) {
		PropertyConfigurator.configure(bundle.getString("file.log_properties"));
		logger.info("************************************************************");
		logger.info("                        Starting...");
		logger.info("************************************************************");
		TMObject tmobject = new TMObject();
		String s = null;
		String s1 = null;
		Date date = null;
		boolean flag = true;
		switch (args[0].length()) {
		case 1: // '\001'
			s = args[0].toUpperCase();
			s1 = tmobject.getCurrentTime("yyyyMMdd");
			break;

		case 9: // '\t'
			s = args[0].substring(0, 1).toUpperCase();
			s1 = args[0].substring(1);
			break;

		default:
			logger.warn((new StringBuilder()).append("Invalid argument:")
					.append(args[0]).toString());
			flag = false;
			break;
		}
		if (!s.equals("L") && !s.equals("C") && !s.equals("A")) {
			flag = false;
			logger.warn("Argument must start with C or L or A");
		}
		SimpleDateFormat simpledateformat = new SimpleDateFormat("yyyyMMdd");
		try {
			date = simpledateformat.parse(s1);
		} catch (Exception exception) {
			logger.error(exception.getMessage());
		}
		if (flag) {
			SunSystemsService sunsystemsservice = new SunSystemsService();
			sunsystemsservice.getData(s, date);
		}
	}
	/*
	public static void main(String args[]) throws IOException{
		String s=MainApp.bundle.getString("YSW.type");
		byte[] b=s.getBytes();
		s=new String(b, "utf8");
		System.out.println(s+"*************");
		File file=new File("D:\\aaa.txt");
		try {
			FileInputStream fi=new FileInputStream(file);
			byte[] temp=new byte[fi.available()];
			fi.read(temp);
			String t=new String(temp,"GB2312");
			System.out.println(t);
			
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}*/
	public static Logger logger = Logger.getLogger("");
	public static ResourceBundle bundle = ResourceBundle.getBundle("config");
}
